// 此文件用于配置项和相关参数设置

// 详情展示页
// 基本信息
// 基础信息模块
const detailInfo = [{
  label: '设备名称',
  name: 'name',
  value: ''
}, {
  label: '固定资产编码',
  name: 'fixAssetCode',
  value: ''
}, {
  label: '设备编号',
  name: 'deviceNumber',
  value: ''
}, {
  label: '设备类别',
  name: 'deviceType',
  value: ''
}, {
  label: '设备分类',
  name: 'deviceClass',
  value: ''
}, {
  label: '使用部门',
  name: 'useDepartment',
  value: ''
}, {
  label: '责任人',
  name: 'responsible',
  value: ''
}, {
  label: '投产日期',
  name: 'productDate',
  value: ''
}, {
  label: '出厂编号',
  name: 'factoryNumber',
  value: ''
}, {
  label: '型号',
  name: 'model',
  value: ''
}, {
  label: '设备原值',
  name: 'deviceValue',
  value: ''
}, {
  label: '使用年限',
  name: 'usedYears',
  value: ''
}, {
  label: '设备主 图',
  name: 'mainDrawFile',
  value: ''
}

]
const histroyShowInfo = [{
  label: '一级 1',

  children: [{
    label: '二级 1-1',
    imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
  }]
},
{
  label: '一级 2',
  children: [{
    label: '二级 2-1',
    imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
  },
  {
    label: '二级 2-2',
    imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
  }
  ]
},
{
  label: '一级 3',
  children: [{
    label: '二级 3-1',
    imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
  },
  {
    label: '二级 3-2',
    imgSrc: 'https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png'
  }
  ]
}
]
const detailShowInfo = {
  detailInfo: detailInfo
  //  broadInfo: broadInfo,
  // histroyShowInfo: histroyShowInfo
}
// 基础信息表单配置
const formData = {
  title: '基础信息',
  formModel: {
    faultDesc: '',
    deviceModel: '',
    haltFlag: '',
    viewPath: ''
  },
  formComponent: [{
    type: 'input',
    label: '故障描述',
    model: 'faultDesc',
    keyUpEnter: 'handleFilter',
    rules: [{ required: true, message: '请输入故障描述', trigger: 'blur' }]
  },
  {
    type: 'select',
    label: '是否停机',
    model: 'haltFlag',
    options: [{
      label: '是',
      value: '0'
    }, {
      label: '否',
      value: '1'
    }],
    rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
  },
  {
    type: 'upload',
    label: '上传图片',
    model: 'viewPath'
    // rules: [{ required: true, message: '请输入上传图片', trigger: 'blur' }]
  }
  ]
}
// 整理后的表单配置
const totalForm = [{
  formName: '维护信息',
  formRef: 'table1', // 表单ref
  formModel: formData.formModel, // 表单model
  formComponent: formData.formComponent,
  formName: formData.title // 表单标题
}
  // {
  //     formName: "档案信息",
  //     formRef: 'table3', //表单ref
  //     formModel: histroyInfo.formModel, //表单model
  //     formComponent: histroyInfo.formComponent,
  //     formName: histroyInfo.title, //表单标题
  //     formStyle: "box-margin-card"
  // }
]

const data = {

  totalForm: totalForm,
  // ----------表单显示相关---------//
  detailShowInfo: detailShowInfo

}
export default data
